package com.zysf.library_boot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class UploadConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String localPath = "file:D:\\code\\library_boot\\src\\main\\resources\\static\\pic\\";
        registry.addResourceHandler("/upLoadImg/**").addResourceLocations(localPath);
    }
}
